<template>
  <div>
    <v-btn
      round
      color="success"
      @click="runFetch"
    >
      fetch
    </v-btn>
    <v-btn
      round
      color="success"
      @click="runAxios"
    >
      axios
    </v-btn>
  </div>
</template>

<script>
import axios from "axios";

export default {
  methods: {
    runFetch() {
      fetch("/yuejianapi/lists")
        .then(res => res.json())
        .then(data => console.log(data))
        .catch(e => console.log(e));
    },
    runAxios() {
      axios
        .get("/yuejianapi/lists")
        .then(res => {
          console.log(res.data);
        })
        .catch(e => console.log(e));
    }
  }
};
</script>